<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
  String xm = this.getServletContext().getInitParameter("path");
	String path1 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+xm;
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>修改楼栋</title>
<base target="_self" />

<link href="<%=path1%>/ht/Styles/css.css"
	rel="stylesheet" type="text/css" />
<link href="<%=path1%>/ht/Styles/ts_css.css"
	rel="stylesheet" type="text/css" />
<script
	src="<%=path1%>/ht/Scripts/My97DatePicker/WdatePicker.js"
	type="text/javascript"></script>
<script
	src="<%=path1%>/ht/Scripts/jquery-1.4.1.min.js"
	type="text/javascript"></script>
<script
	src="<%=path1%>/ht/Scripts/IndexManager.js"
	type="text/javascript"></script>

<script type="text/javascript">
	//查询项目
 	 $.ajax({
			url : "<%=path1%>/qt/ht/build/selectAllByAdd.do",
			datatype : 'json',
			error : function(data) {
				alert("出错了！！");
			},
			success : function(data) {
				//alert("成功了");	    	   
				var len = data.msg.length;
				var select = document.getElementById("project_id");
				var project_id = $("#proid").val();
				alert(project_id);
				var html = "";
				if (len > 0) {
					data.msg.forEach(function(e) {
						if (e.project_id == project_id) {
							alert(e.project_name);
							html += "<option value="+e.project_id+" selected='selected'>"
								+ e.project_name + "</option>";
						} else {
							html += "<option value="+e.project_id+">"
								+ e.project_name + "</option>";
					    }
				})
					//alert(html);
					$("#project_id").append(html);
				}
			}
		}); 
</script>
  <script type="text/javascript">
      function breaks(){
	      window.location.href="<%=path1%>/qt/ht/build/selectAll.do";
      }
  </script>
</head>
<body>
	<form method="post" action="<%=path1%>/qt/ht/build/updateBuild.do" id="form1">
		<div id="divTwo">
			<table width="100%" border="0" cellpadding="2" cellspacing="2" class="table_list1">
				<h2 align="center">修改楼栋信息</h2>
				<tr>
					<td width="40%" class="table_list1_style1">
						<p></p>
					</td>
					<td width="60%" class="table_list1_style2"></td>
				</tr>

				<%-- <tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 项目名称:
					</td>
					<td width="50%" class="table_list1_style2"><input
						type="hidden" id="proid" name="proid" value="${proj.project_id}" />
						<select name="project_id" id="project_id" id="txtLeved"
						class="aspNetDisabled" style="width: 207px; height: 25px">

					</select></td>
				</tr> --%>

               <tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 项目名称:
					</td>
					<td width="50%" class="table_list1_style2"><input
						type="hidden" id="proid" name="proid"/>
					   <select name="project_id" id="project_id" id="txtLeved"
						  class="aspNetDisabled" style="width: 207px; height: 25px">
						   <c:forEach items="${proj}" var="a">
					           <option value="${a.project_id}">${a.project_name}</option>
					       </c:forEach>
					   </select>
					</td>
			   </tr>

				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 楼栋名称:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="build_name" id="build_name" type="text" id="txtLeved"
						value="${build.build_name}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>

				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 楼层数:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="floor_count" id="floor_count" type="text" id="txtLeved"
						value="${build.floor_count}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>

				<!-- 取ID的值  不需要显示 -->
				<input name="build_id" id="build_id" type="hidden"
					value="${build.build_id}" />

				<input type="hidden" name="update_user" id="update_user"
					value="${bean.name}" />
				
                <input type="hidden" name="update_time" id="update_time"
				value="${build.update_time}" />
			

				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> 备注:
					</td>
					<td width="50%" class="table_list1_style2"><input type="text"
						name="remark" id="remark" value="${build.remark}"
						style="width: 200px; height: 24px" /></td>
				</tr>

				<tr>
					<td class="table_list1_style1">&nbsp;</td>
					<td class="table_list1_style2">
						<p></p> <input type="submit" id="send" name="btnAdd" value="修改"
						tabindex="1" class="button" /> &nbsp;&nbsp; <input id="btnBack"
						type="button" class="button" value="返回" onclick="breaks();" />
					</td>
				</tr>

			</table>
		</div>
	</form>
</body>
</html>